/**
 * 
 */
package com.roc.util.constant;

import org.apache.commons.lang3.StringUtils;

/**
 * @author dxpeng 2013-8-8 下午6:32:41
 */
public enum AuditingType {
	 
	 OPERATORS_AUDITING("操作员审核", "1001"),
	 AGENT_AUDITING("代理商初审", "2001"),
	 AGENT_RE_AUDITING("代理商复审", "2002"),
	 MERCHANT_AUDITING("特约商户初审", "3001"),
	 MERCHANT_RE_AUDITING("特约商户复审", "3002"),
	 MERCHANT_LAST_AUDITING("特约商户终审", "3003"),
	 MERCHANT_BUS_AUDITING("特约商户业务复审", "3005"),
	 MERCHANT_BASICINFO_AUDITING("商户 信息变更初审", "3004"),
	 SETTING_FROZENAPPLY("冻结申请", "4001"),
	 SETTING_UNFROZENAPPLY("解冻申请", "4002"),
	 SETTING_REVIEWFROZEN("冻结审核", "4003"),
	 SETTING_REVIEWUNFROZEN("解冻审核", "4004"),
	 SETTING_REVIEWSETTING("结算审核", "4005"),
	 DIAODAN_APPLY("调单申请", "5001"),
	 DIAODAN_WANSHAN("调单完善", "5002"),
	 DIAODAN_REVIEW("调单审批", "5003"),
	 DIAODAN_HANDLE("调单撤销", "5004"),
	 MERCHANT_CHANGE_AUDITING("变更信息复审","6001"),
	 MERCHANT_CHANGE_AUDITING_ONE("变更信息初审","6002"),
	 OPERATOR_AUTH_AUTH("实名认证审核","7001");
	
	 
	private String code;
	private String name;
	private boolean editAble;
	private boolean enabled;

	private AuditingType( String name,String code) {
		this.code = code;
		this.name = name;
		
	}

	public boolean isEditAble() {
		return editAble;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public static AuditingType valueOfCode(String code) {
		if (StringUtils.isBlank(code)) {
			throw new IllegalArgumentException("SysLogType code " + code
					+ " is blank");
		}
		for (AuditingType ms : values()) {
			if (ms.getCode().equals(code)) {
				return ms;
			}
		}
		throw new IllegalArgumentException("SysLogType code " + code
				+ " is not exist");
	}

	
}
